package com.cola.Comparable;

import java.lang.reflect.Array;
import java.util.Arrays;

/**
 * @Grup:com.cola.Comparable
 * @Auther:cola
 * @Data:2021/3/16-2021-03-16:01
 * @version:1.0
 *
 */
public class Test {
    public static void main(String[] args) {
        int []nums={34,54,22,3,5,8};
        Arrays.sort(nums);
        System.out.println(Arrays.toString(nums));
        String[] names={"jack","Tom","苗"};
        Arrays.sort(names);
        System.out.println(Arrays.toString(names));

        Cat []cats={new Cat("ff",18),new Cat("发发",15)};
        Arrays.sort(cats);
        System.out.println(Arrays.toString(cats));
        Dog []dogs={new Dog("发发",65),new Dog("爱他",15)};
        Arrays.sort(dogs,new DogComparator());
        System.out.println(Arrays.toString(dogs));
    }
}
